﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPMS.Log.Core
{
    /// <summary>
    /// 安全上下文接口
    /// </summary>
    /// <remarks>用于模拟用户提升权限</remarks>
    /// <history>
    /// [zanezeng]               2010/1/13 12:03    创建
    /// </history>
    public interface ISecurityContext
    {
        /// <summary>
        /// 根据给定的状态对象模拟特定的用户以提升权限
        /// </summary>
        /// <param name="state">包含模拟用户信息的状态对象</param>
        /// <returns>表示提升权限之后的上下文对象</returns>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2010/1/13 12:05    创建
        /// </history>
        IDisposable Impersonate( object state );
    }
}
